package eu.news.data.dao;

import eu.news.data.hibernate.dao.HibernateDAOFactory;
import eu.news.data.pojo.Entity;

public abstract class DAOFactory {
	
	private static DAOFactory instance = new HibernateDAOFactory();
	
	protected abstract DAO<? extends Entity> getDAO(
			Class<? extends DAO<? extends Entity>> daoType);

	public static NewsDAO getNewsDAO() {
		return (NewsDAO) instance.getDAO(NewsDAO.class);
	}

	public static InterfaceDAO getInterfaceDAO() {
		return (InterfaceDAO) instance.getDAO(InterfaceDAO.class);
	}

	public static OperatorDAO getOperatorDAO() {
		return (OperatorDAO) instance.getDAO(OperatorDAO.class);
	}

	public static PictureDAO getPictureDAO() {
		return (PictureDAO) instance.getDAO(PictureDAO.class);
	}

	public static SortDAO getSortDAO() {
		return (SortDAO) instance.getDAO(SortDAO.class);
	}

	public static SpecialDAO getSpecialDAO() {
		return (SpecialDAO) instance.getDAO(SortDAO.class);
	}

	public static SysConfigDAO getSysConfigDAO() {
		return (SysConfigDAO) instance.getDAO(SysConfigDAO.class);
	}
}